package com.intelli.eve.core.impl.message_bus;

import com.intelli.eve.core.api.message.AbstractMessage;
import com.intelli.eve.core.api.message.Header;
import com.intelli.eve.core.api.message.MessageProtocols;

/**
 * Author: Sergey42
 * Date: 26.04.14 11:28
 */
public class SimpleMessage extends AbstractMessage<Header> {

    public SimpleMessage(Header header) {
        super(header);
    }

    @Override
    public Object getContent() {
        return header.getMessageId();
    }

    @Override
    public void setHeader(Header header) {
        super.setHeader(header);
        header.setProtocol(MessageProtocols.SIMPLE);
    }
}
